package com.example.demo.entity;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * 部门表
 * @author Administrator
 *
 */
@Table
@Entity
public class SysDept implements Serializable{

	@Id
	public String id;
	
	@Column(name="dept_name")
	public String name;
	
	@OneToMany(mappedBy = "dept_id",fetch=FetchType.EAGER)
	public Set<SysUser> sysUser = new HashSet<SysUser>();

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Set<SysUser> getSysUser() {
		return sysUser;
	}

	public void setSysUser(Set<SysUser> sysUser) {
		this.sysUser = sysUser;
	}
	
	
}
